package com.kly.service;

import com.kly.model.domain.Team;
import com.baomidou.mybatisplus.extension.service.IService;
import com.kly.model.dto.JoinTeamDto;
import com.kly.model.dto.TeamDto;
import com.kly.model.dto.TeamQuery;
import com.kly.model.vo.PageResult;
import com.kly.model.vo.TeamVo;

/**
 * @author admin
 * @description 针对表【team(队伍表)】的数据库操作Service
 * @createDate 2025-02-23 21:58:40
 */
public interface TeamService extends IService<Team> {


    /**
     * 创建队伍
     *
     * @param teamDto
     * @return
     */
    Long createTeam(TeamDto teamDto);


    /**
     * 搜索队伍
     *
     * @param teamQuery
     * @param type
     * @return
     */
    PageResult<TeamVo> searchTeamsByPage(TeamQuery teamQuery, Boolean type);


    /**
     * 更新队伍
     * @param teamDto
     * @return
     */
    Boolean updateTeam(TeamDto teamDto);


    /**
     * 加入队伍
     * @param joinTeamDto
     * @return
     */
    Boolean joinTeam(JoinTeamDto joinTeamDto);

    /**
     * 退出队伍
     * @param joinTeamDto
     * @return
     */
    Boolean quitTeam(JoinTeamDto joinTeamDto);


    /**
     * 删除队伍
     * @param id
     * @return
     */
    Boolean deleteTeam(Long id);
}
